package com.xxwy.ddu.security.code.authonrize.impl;

import com.xxwy.ddu.security.code.authonrize.AuthorizeConfigProvider;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Component;

/**
 * @author xxwy
 * on 2018/9/5 0005
 */
@Component
@Order(Integer.MAX_VALUE)
public class LastAuthorizeConfigProvider implements AuthorizeConfigProvider  {
    @Override
    public boolean config(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry config) {
        config.anyRequest().authenticated();
        return true;
    }
}
